package com.vone.export;

import java.util.ArrayList;
import java.util.List;

import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.util.CellRangeAddress;

import com.vone.entity.Basicdata;
import com.vone.entity.CsBusinessPlan;
import com.vone.entity.Csfinancialforecastdata;
import com.vone.entity.Cshistoricalfinancialdata;
import com.vone.export.until.ExcelStyle;
import com.vone.export.until.ExcelStyleHight;

//创建商业计划书，第四个sheet
public class BusinessPlanBaseSheet {
	
	
	private ExcelStyle excelstyle = null;
	private ExcelStyleHight excelstylehight = null;
	
	@SuppressWarnings("deprecation")
	public void getBusinessPlanBaseSheet(Basicdata basicdatas){
		
		excelstyle = new ExcelStyle();// 实例化样式
		excelstylehight = new ExcelStyleHight();// 实例化样式
		
		//商业计划书
		CsBusinessPlan jihuashu = basicdatas.getCsbusinessplan();
		//历史财务
		Cshistoricalfinancialdata lishicaiwu = basicdatas.getCshistoricalfinancialdata();
		//财务预测
		Csfinancialforecastdata caiwuyuce = basicdatas.getCsfinancialforecastdata();
		
		HSSFWorkbook wb = (HSSFWorkbook) ExportUntil.workbook;
		//创建第一个sheet
		Sheet sheet4 = ExportUntil.workbook.createSheet("商业计划书");
		//设置列的宽度(以字符为单位,20*256=20个字符),setColumnWidth(第几列,多少宽度*256)
		sheet4.setColumnWidth(0, 40 * 256);
		sheet4.setColumnWidth(1, 30 * 256);
		sheet4.setColumnWidth(2, 25 * 256);
		sheet4.setColumnWidth(3, 25 * 256);
		sheet4.setColumnWidth(4, 25 * 256);
		sheet4.setColumnWidth(5, 25 * 256);
		
		//在sheet里创建第一行，参数为行索引(excel的行)，可以是0～65535之间的任何一个
		HSSFRow row0 = (HSSFRow) sheet4.createRow(0);
		//创建单元格（excel的单元格，参数为列索引，可以是0～255之间的任何一个
		HSSFCell tableCell = row0.createCell(0);
		//设置单元格内容
		tableCell.setCellValue("商业计划书");
		//合并单元格CellRangeAddress构造参数依次表示[起始行,截至行,起始列,截至列]
		sheet4.addMergedRegion(new CellRangeAddress(0,0,0,5));
		//设置第一行的高度
		row0.setHeight((short) 800);//参数500约等于0.9cm,34px
		
		//构建标题样式
		HSSFCellStyle tableCellStyle = wb.createCellStyle();
		tableCellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER); //左右居中
		tableCellStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);//上下居中
		HSSFFont tableFont = wb.createFont();//构建字体
		tableFont.setFontName("宋体");//设置字体
		tableFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);//设置粗体
		tableFont.setFontHeightInPoints((short) 12);//设置字体大小
		tableCellStyle.setFont(tableFont);//应用到样式
		tableCell.setCellStyle(tableCellStyle);//应用到单元格
		
		
		//合并单元格CellRangeAddress构造参数依次表示[起始行,截至行,起始列,截至列]
		sheet4.addMergedRegion(new CellRangeAddress(1,5,0,0));
		sheet4.addMergedRegion(new CellRangeAddress(1,1,4,5));
		sheet4.addMergedRegion(new CellRangeAddress(2,2,4,5));
		sheet4.addMergedRegion(new CellRangeAddress(3,3,4,5));
		sheet4.addMergedRegion(new CellRangeAddress(5,5,1,5));
		sheet4.addMergedRegion(new CellRangeAddress(6,6,1,5));
		sheet4.addMergedRegion(new CellRangeAddress(7,7,1,5));
		sheet4.addMergedRegion(new CellRangeAddress(8,8,1,5));
		
		
		
		//在sheet里创建第2行
		HSSFRow row1 = (HSSFRow) sheet4.createRow(1);
		row1.setHeight((short) 800);
		
		HSSFCell row1_cell_0 = row1.createCell(0);
		HSSFCell row1_cell_1 = row1.createCell(1);
		HSSFCell row1_cell_2 = row1.createCell(2);
		HSSFCell row1_cell_3 = row1.createCell(3);
		HSSFCell row1_cell_4 = row1.createCell(4);
		
		
		row1_cell_0.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row1_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row1_cell_2.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row1_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row1_cell_4.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		//设置单元格内容
		row1_cell_0.setCellValue("*主要技术、产品及服务");
		row1_cell_1.setCellValue("参赛项目名称");
		if(jihuashu!=null && jihuashu.getProject_name()!=null){
			row1_cell_2.setCellValue(jihuashu.getProject_name());
		}else{
			row1_cell_2.setCellValue("无");
		}
		row1_cell_3.setCellValue("参赛项目占去年企业收入比例");
		if(jihuashu!=null && jihuashu.getIncome_rate()!=null){
			row1_cell_4.setCellValue(jihuashu.getIncome_rate()+"%");
		}else{
			row1_cell_4.setCellValue("无");
		}
		
		
		//在sheet里创建第3行和单元格
		HSSFRow row2 = (HSSFRow) sheet4.createRow(2);
		row2.setHeight((short) 800);
		
		HSSFCell row2_cell_1 = row2.createCell(1);
		HSSFCell row2_cell_2 = row2.createCell(2);
		HSSFCell row2_cell_3 = row2.createCell(3);
		HSSFCell row2_cell_4 = row2.createCell(4);
		
		
		row2_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row2_cell_2.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row2_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row2_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row2_cell_4.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		//设置单元格内容
		row2_cell_1.setCellValue("属国内领先水平");
		if(jihuashu!=null && jihuashu.getIs_domestic_leading()!=null){
			row2_cell_2.setCellValue(Integer.parseInt(jihuashu.getIs_domestic_leading())==1?"是":"否");
		}else{
			row2_cell_2.setCellValue("否");
		}
		row2_cell_3.setCellValue("属国际领先水平");
		if(jihuashu!=null && jihuashu.getIs_international_leading()!=null){
			row2_cell_4.setCellValue(Integer.parseInt(jihuashu.getIs_international_leading())==1?"是":"否");
		}else{
			row2_cell_4.setCellValue("否");
		}
			
		//在sheet里创建第4行和单元格
		HSSFRow row3 = (HSSFRow) sheet4.createRow(3);
		HSSFCell row3_cell_1 = row3.createCell(1);
		HSSFCell row3_cell_2 = row3.createCell(2);
		HSSFCell row3_cell_3 = row3.createCell(3);
		HSSFCell row3_cell_4 = row3.createCell(4);
		
		row3_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row3_cell_2.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row3_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row3_cell_4.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		//设置单元格内容
		row3_cell_1.setCellValue("类似技术研究机构");
		if(jihuashu!=null && jihuashu.getIs_international_leading()!=null){
			row3_cell_2.setCellValue(Integer.parseInt(jihuashu.getHas_similar_tec_research_org())==1?"有":"无");
		}else{
			row3_cell_2.setCellValue("无");
		}
		row3_cell_3.setCellValue("机构名称");
		if(jihuashu!=null && jihuashu.getHas_similar_tec_research_org()!=null){
			row3_cell_4.setCellValue(Integer.parseInt(jihuashu.getHas_similar_tec_research_org())==1?jihuashu.getResearch_org_name():"无");
		}else{
			row3_cell_4.setCellValue("无");
		}
		
		//在sheet里创建第5行和单元格
		HSSFRow row4 = (HSSFRow) sheet4.createRow(4);
		HSSFCell row4_cell_1 = row4.createCell(1);
		HSSFCell row4_cell_2 = row4.createCell(2);
		HSSFCell row4_cell_3 = row4.createCell(3);
		HSSFCell row4_cell_4 = row4.createCell(4);
		
		row4_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row4_cell_2.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row4_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row4_cell_4.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		
		//设置单元格内容
		row4_cell_1.setCellValue("参赛项目产品图片");
		if(jihuashu!=null && jihuashu.getHas_product_img()!=null){
			row4_cell_2.setCellValue(Integer.parseInt(jihuashu.getHas_product_img())==1?"有":"无");
		}else{
			row4_cell_2.setCellValue("无");
		}
		row4_cell_3.setCellValue("");//留空
		row4_cell_4.setCellValue("");//留空
		
		//在sheet里创建第6行和单元格
		HSSFRow row5 = (HSSFRow) sheet4.createRow(5);
		HSSFCell row5_cell_1 = row5.createCell(1);
		
		row5_cell_1.setCellStyle(excelstylehight.getCellStyleheader());// 应用到单元格
		//设置单元格内容
		if(jihuashu!=null && jihuashu.getComment()!=null){
			row5_cell_1.setCellValue(jihuashu.getComment());
		}else{
			row5_cell_1.setCellValue("无");
		}
		
		//在sheet里创建第7行和单元格
		HSSFRow row6 = (HSSFRow) sheet4.createRow(6);
		HSSFCell row6_cell_0 = row6.createCell(0);
		HSSFCell row6_cell_1 = row6.createCell(1);
		
		row6_cell_0.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row6_cell_1.setCellStyle(excelstylehight.getCellStyleheader());// 应用到单元格
		//设置单元格内容
		row6_cell_0.setCellValue("*产品市场分析");
		if(jihuashu!=null && jihuashu.getMarket_analysis()!=null){
			row6_cell_1.setCellValue(jihuashu.getMarket_analysis());
		}else{
			row6_cell_1.setCellValue("无");
		}
		
		//在sheet里创建第8行和单元格
		HSSFRow row7 = (HSSFRow) sheet4.createRow(7);
		HSSFCell row7_cell_0 = row7.createCell(0);
		HSSFCell row7_cell_1 = row7.createCell(1);
		
		row7_cell_0.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row7_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		
		//设置单元格内容
		row7_cell_0.setCellValue("当前五大客户");
		if(jihuashu!=null && jihuashu.getTop_five_customer()!=null){
			row7_cell_1.setCellValue(jihuashu.getTop_five_customer());
		}else{
			row7_cell_1.setCellValue("无");
		}
		
		//在sheet里创建第9行和单元格
		HSSFRow row8 = (HSSFRow) sheet4.createRow(8);
		HSSFCell row8_cell_0 = row8.createCell(0);
		HSSFCell row8_cell_1 = row8.createCell(1);
		
		row8_cell_0.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row8_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		
		//设置单元格内容
		row8_cell_0.setCellValue("当前五大供应商");
		if(jihuashu!=null && jihuashu.getTop_five_supplier()!=null){
			row8_cell_1.setCellValue(jihuashu.getTop_five_supplier());
		}else{
			row8_cell_1.setCellValue("无");
		}
		
		//市场竞争分析模块
		//在sheet里创建第10行和单元格
		HSSFRow row9 = (HSSFRow) sheet4.createRow(9);
		HSSFCell row9_cell_0 = row9.createCell(0);
		HSSFCell row9_cell_1 = row9.createCell(1);
		HSSFCell row9_cell_2 = row9.createCell(2);
		HSSFCell row9_cell_3 = row9.createCell(3);
		HSSFCell row9_cell_4 = row9.createCell(4);
		HSSFCell row9_cell_5 = row9.createCell(5);
		
		row9_cell_0.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row9_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row9_cell_2.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row9_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row9_cell_4.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row9_cell_5.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		//设置单元格内容
		row9_cell_0.setCellValue("*市场竞争分析");
		row9_cell_1.setCellValue("主要市场竞争对手");
		row9_cell_2.setCellValue("国际竞争对手");
		row9_cell_3.setCellValue("竞争对手名称");
		row9_cell_4.setCellValue("是否上市公司");
		row9_cell_5.setCellValue("市场份额占有率(%)");
		
		int gjjzSize=0;//国际竞争对手集合大小
		//判断是否有竞争对手
		if(jihuashu!=null && jihuashu.getHas_international_competitor()!=null){
			if(Integer.parseInt(jihuashu.getHas_international_competitor())==1){
				if(jihuashu.getInternational_competitor_name().length()>0){
					gjjzSize = jihuashu.getInternational_competitor_name().split(",").length;//国际竞争对手集合大小
					for (int i = 1; i <= gjjzSize; i++) {
						//在sheet里创建第11开始到（9+i）行和单元格
						HSSFRow row10_i = (HSSFRow) sheet4.createRow(9+i);
						HSSFCell row10_i_cell_3 = row10_i.createCell(3);
						HSSFCell row10_i_cell_4 = row10_i.createCell(4);
						HSSFCell row10_i_cell_5 = row10_i.createCell(5);
						
						row10_i_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
						row10_i_cell_4.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
						row10_i_cell_5.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
						
						//设置单元格内容
						row10_i_cell_3.setCellValue(jihuashu.getInternational_competitor_name().split(",")[i-1]);
						row10_i_cell_4.setCellValue(Integer.parseInt(jihuashu.getIs_listed_international_competitor().split(",")[i-1])==1?"是":"否");
						row10_i_cell_5.setCellValue(jihuashu.getInternational_competitor_market_share_rate().split(",")[i-1]);
					}
				}
			}
		}
		int gjjzMaxRow = 9+gjjzSize;//循环完国际竞争对手后到达的行数
		if(gjjzMaxRow>9){
			sheet4.addMergedRegion(new CellRangeAddress(9,gjjzMaxRow,2,2));//国际竞争对手的跨行数
		}
		
		
		//国内竞争对手
		int gnjzLocRow = gjjzMaxRow+1;//国内竞争对手所在行
		HSSFRow row_gnjz = (HSSFRow) sheet4.createRow(gnjzLocRow);
		HSSFCell row_gnjz_cell_2 = row_gnjz.createCell(2);
		HSSFCell row_gnjz_cell_3 = row_gnjz.createCell(3);
		HSSFCell row_gnjz_cell_4 = row_gnjz.createCell(4);
		HSSFCell row_gnjz_cell_5 = row_gnjz.createCell(5);
		
		
		row_gnjz_cell_2.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_gnjz_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_gnjz_cell_4.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_gnjz_cell_5.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		
		//设置单元格内容
		row_gnjz_cell_2.setCellValue("国内竞争对手");
		row_gnjz_cell_3.setCellValue("竞争对手名称");
		row_gnjz_cell_4.setCellValue("是否上市公司");
		row_gnjz_cell_5.setCellValue("市场份额占有率(%)");
		
		//循环
		int gnjzSize = 0;//国内竞争对手集合大小
		if(jihuashu!=null && jihuashu.getHas_domestic_competitor()!=null){
			if(Integer.parseInt(jihuashu.getHas_domestic_competitor())==1){
				if(jihuashu.getDomestic_competitor_name().length()>0){
					gnjzSize = jihuashu.getDomestic_competitor_name().split(",").length;//国际竞争对手集合大小
					for (int i = 1; i <= gnjzSize; i++) {
						//在sheet里创建第11开始到（9+i）行和单元格
						HSSFRow row_i = (HSSFRow) sheet4.createRow(gnjzLocRow+i);
						HSSFCell row_i_cell_3 = row_i.createCell(3);
						HSSFCell row_i_cell_4 = row_i.createCell(4);
						HSSFCell row_i_cell_5 = row_i.createCell(5);
						
						row_i_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
						row_i_cell_4.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
						row_i_cell_5.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
						//设置单元格内容
						row_i_cell_3.setCellValue(jihuashu.getDomestic_competitor_name().split(",")[i-1]);
						row_i_cell_4.setCellValue(Integer.parseInt(jihuashu.getIs_listed_domestic_competitor().split(",")[i-1])==1?"是":"否");
						row_i_cell_5.setCellValue(jihuashu.getDomestic_competitor_market_share_rate().split(",")[i-1]);
					}
				}
			}
		}
		int gnjzMaxRow = gnjzLocRow+gnjzSize;//循环完国内竞争对手后到达的行数
		if(gnjzMaxRow>gnjzLocRow){
			sheet4.addMergedRegion(new CellRangeAddress(gnjzLocRow,gnjzMaxRow,2,2));//国内竞争对手的跨行数
		}
		//主要市场竞争对手的跨行数
		sheet4.addMergedRegion(new CellRangeAddress(9,gnjzMaxRow,1,1));
		
		//国内市场地位排名
		int gnscdwpmLocRow = gnjzMaxRow+1;//国内市场地位排名所在行
		HSSFRow row_gnscdwpm = (HSSFRow) sheet4.createRow(gnscdwpmLocRow);
		HSSFCell row_gnscdwpm_cell_1 = row_gnscdwpm.createCell(1);
		HSSFCell row_gnscdwpm_cell_2 = row_gnscdwpm.createCell(2);
		
		row_gnscdwpm_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_gnscdwpm_cell_2.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		
		//设置单元格内容
		row_gnscdwpm_cell_1.setCellValue("国内市场地位排名");
		if(jihuashu!=null && jihuashu.getDomestic_ranking()!=null){
			row_gnscdwpm_cell_2.setCellValue("第 "+(Integer.parseInt(jihuashu.getDomestic_ranking())==0?"":jihuashu.getDomestic_ranking())+" 名");
		}else{
			row_gnscdwpm_cell_2.setCellValue("第_____名");
		}
		//跨行数
		sheet4.addMergedRegion(new CellRangeAddress(gnscdwpmLocRow,gnscdwpmLocRow,2,5));
		
		//市场份额占有率
		int scfezylLocRow = gnscdwpmLocRow+1;//市场份额占有率所在行
		HSSFRow row_scfezyl = (HSSFRow) sheet4.createRow(scfezylLocRow);
		HSSFCell row_scfezyl_cell_1 = row_scfezyl.createCell(1);
		HSSFCell row_scfezyl_cell_2 = row_scfezyl.createCell(2);
		row_scfezyl_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_scfezyl_cell_2.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		
		//设置单元格内容
		row_scfezyl_cell_1.setCellValue("市场份额占有率");
		if(jihuashu!=null && jihuashu.getMarket_share_rate()!=null){
			row_scfezyl_cell_2.setCellValue(jihuashu.getMarket_share_rate()==null?"":jihuashu.getMarket_share_rate()+"%");
		}else{
			row_scfezyl_cell_2.setCellValue("_____%");
		}
		//跨行数
		sheet4.addMergedRegion(new CellRangeAddress(scfezylLocRow,scfezylLocRow,2,5));
		
		//竞争优势
		int jzyslLocRow = scfezylLocRow+1;//市场份额占有率所在行
		HSSFRow row_jzys = (HSSFRow) sheet4.createRow(jzyslLocRow);
		HSSFCell row_jzys_cell_1 = row_jzys.createCell(1);
		HSSFCell row_jzys_cell_2 = row_jzys.createCell(2);
		row_jzys_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_jzys_cell_2.setCellStyle(excelstylehight.getCellStyleheader());// 应用到单元格
		
		//设置单元格内容
		row_jzys_cell_1.setCellValue("竞争优势");
		if(jihuashu!=null && jihuashu.getCompetitive_edge()!=null){
			row_jzys_cell_2.setCellValue(jihuashu.getCompetitive_edge());
		}else{
			row_jzys_cell_2.setCellValue("无");
		}
		//跨行数
		sheet4.addMergedRegion(new CellRangeAddress(jzyslLocRow,jzyslLocRow,2,5));
		
		//市场竞争分析说明
		int shuomingLocRow = jzyslLocRow+1;//市场份额占有率所在行
		HSSFRow row_shuoming = (HSSFRow) sheet4.createRow(shuomingLocRow);
		HSSFCell row_shuoming_cell_1 = row_shuoming.createCell(1);
		
		row_shuoming_cell_1.setCellStyle(excelstylehight.getCellStyleheader());// 应用到单元格
		
		//设置单元格内容
		row_shuoming_cell_1.setCellValue("(主要竞争对手，竞争对手分析，国外相关企业对比说明，如果产品已经在市场上形成了竞争优势，请说明与哪些因素有关，如成本相同但销售价格低，成本低形成销售价格优势，以及产品性能、品牌、销售渠道优于竞争对手产品，等等，描述所属行业及市场地位)");
		//跨行数
		sheet4.addMergedRegion(new CellRangeAddress(shuomingLocRow,shuomingLocRow,1,5));
		
		//市场竞争分析跨行数的总行数
		int scjzMaxRow = shuomingLocRow;
		//市场竞争分析跨行数
		sheet4.addMergedRegion(new CellRangeAddress(9,scjzMaxRow,0,0));
		
		
		//商业模式模块
		//商业模式
		int symsLocRow = scjzMaxRow+1;//应该所在的行
		HSSFRow row_syms = (HSSFRow) sheet4.createRow(symsLocRow);
		HSSFCell row_syms_cell_0 = row_syms.createCell(0);
		HSSFCell row_syms_cell_1 = row_syms.createCell(1);
		
		row_syms_cell_0.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_syms_cell_1.setCellStyle(excelstylehight.getCellStyleheader());// 应用到单元格
		
		//设置单元格内容
		row_syms_cell_0.setCellValue("*商业模式");
		if(jihuashu!=null && jihuashu.getBusiness_model()!=null){
			row_syms_cell_1.setCellValue(jihuashu.getBusiness_model());
		}else{
			row_syms_cell_1.setCellValue("无");
		}
		//跨行数
		sheet4.addMergedRegion(new CellRangeAddress(symsLocRow,symsLocRow,1,5));
		
		
		//业务拓展计划模块
		//业务拓展计划
		int ywtzjhLocRow = symsLocRow+1;//应该所在的行
		HSSFRow row_ywtzjh = (HSSFRow) sheet4.createRow(ywtzjhLocRow);
		HSSFCell row_ywtzjh_cell_0 = row_ywtzjh.createCell(0);
		HSSFCell row_ywtzjh_cell_1 = row_ywtzjh.createCell(1);
		
		row_ywtzjh_cell_0.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_ywtzjh_cell_1.setCellStyle(excelstylehight.getCellStyleheader());// 应用到单元格
		//设置单元格内容
		row_ywtzjh_cell_0.setCellValue("*业务拓展计划");
		if(jihuashu!=null && jihuashu.getExpand_plan()!=null){
			row_ywtzjh_cell_1.setCellValue(jihuashu.getExpand_plan());
		}else{
			row_ywtzjh_cell_1.setCellValue("无");
		}
		//跨行数
		sheet4.addMergedRegion(new CellRangeAddress(ywtzjhLocRow,ywtzjhLocRow,1,5));
		
		
		//经营风险与对策模块
		//经营风险与对策
		int jyfxLocRow = ywtzjhLocRow+1;//应该所在的行
		HSSFRow row_jyfx = (HSSFRow) sheet4.createRow(jyfxLocRow);
		HSSFCell row_jyfx_cell_0 = row_jyfx.createCell(0);
		HSSFCell row_jyfx_cell_1 = row_jyfx.createCell(1);
		HSSFCell row_jyfx_cell_2 = row_jyfx.createCell(2);
		HSSFCell row_jyfx_cell_3 = row_jyfx.createCell(3);
		
		
		row_jyfx_cell_0.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_jyfx_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_jyfx_cell_2.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_jyfx_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		
		
		//设置单元格内容
		row_jyfx_cell_0.setCellValue("*经营风险与对策");
		row_jyfx_cell_1.setCellValue("法律风险");
		row_jyfx_cell_2.setCellValue("经济诉讼");
		if(jihuashu!=null && jihuashu.getHas_economic_litigation()!=null){
			row_jyfx_cell_3.setCellValue(Integer.parseInt(jihuashu.getHas_economic_litigation())==1?"有":"无");
		}else{
			row_jyfx_cell_3.setCellValue("无");
		}
		//跨行数
		sheet4.addMergedRegion(new CellRangeAddress(jyfxLocRow,jyfxLocRow,3,5));
		
		//经济诉讼-诉讼原因
		int jjssyyLocRow = jyfxLocRow+1;//应该所在的行
		HSSFRow row_jjssyy = (HSSFRow) sheet4.createRow(jjssyyLocRow);
		HSSFCell row_jjssyy_cell_3 = row_jjssyy.createCell(3);
		HSSFCell row_jjssyy_cell_4 = row_jjssyy.createCell(4);
		
		row_jjssyy_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_jjssyy_cell_4.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		
		//设置单元格内容
		row_jjssyy_cell_3.setCellValue("诉讼原因");
		if(jihuashu!=null && jihuashu.getHas_economic_litigation()!=null){
			row_jjssyy_cell_4.setCellValue(Integer.parseInt(jihuashu.getHas_economic_litigation())==1?jihuashu.getEconomic_litigation_reason():"无");
		}else{
			row_jjssyy_cell_4.setCellValue("无");
		}
		//跨行数
		sheet4.addMergedRegion(new CellRangeAddress(jjssyyLocRow,jjssyyLocRow,4,5));
		//经济诉讼跨行
		sheet4.addMergedRegion(new CellRangeAddress(jyfxLocRow,jjssyyLocRow,2,2));
		
		//环保诉讼
		int hbssLocRow = jjssyyLocRow+1;//应该所在的行
		HSSFRow row_hbss = (HSSFRow) sheet4.createRow(hbssLocRow);
		HSSFCell row_hbss_cell_2 = row_hbss.createCell(2);
		HSSFCell row_hbss_cell_3 = row_hbss.createCell(3);
		
		row_hbss_cell_2.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_hbss_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		
		//设置单元格内容
		row_hbss_cell_2.setCellValue("环保诉讼");
		if(jihuashu!=null && jihuashu.getHas_environment_litigation()!=null){
			row_hbss_cell_3.setCellValue(Integer.parseInt(jihuashu.getHas_environment_litigation())==1?"有":"无");
		}else{
			row_hbss_cell_3.setCellValue("无");
		}
		//跨行数
		sheet4.addMergedRegion(new CellRangeAddress(hbssLocRow,hbssLocRow,3,5));
		
		//环保诉讼-诉讼原因
		int hbssyyLocRow = hbssLocRow+1;//应该所在的行
		HSSFRow row_hbssyy = (HSSFRow) sheet4.createRow(hbssyyLocRow);
		HSSFCell row_hbssyy_cell_3 = row_hbssyy.createCell(3);
		HSSFCell row_hbssyy_cell_4 = row_hbssyy.createCell(4);
		
		row_hbssyy_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_hbssyy_cell_4.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		
		//设置单元格内容
		row_hbssyy_cell_3.setCellValue("诉讼原因");
		if(jihuashu!=null && jihuashu.getHas_environment_litigation()!=null){
			row_hbssyy_cell_4.setCellValue(Integer.parseInt(jihuashu.getHas_environment_litigation())==1?jihuashu.getEnvironment_litigation_reason():"无");
		}else{
			row_hbssyy_cell_4.setCellValue("无");
		}
		//跨行数
		sheet4.addMergedRegion(new CellRangeAddress(hbssyyLocRow,hbssyyLocRow,4,5));
		//环保诉讼跨行
		sheet4.addMergedRegion(new CellRangeAddress(hbssLocRow,hbssyyLocRow,2,2));
		
		//其他诉讼
		int qtssLocRow = hbssyyLocRow+1;//应该所在的行
		HSSFRow row_qtss = (HSSFRow) sheet4.createRow(qtssLocRow);
		HSSFCell row_qtss_cell_2 = row_qtss.createCell(2);
		HSSFCell row_qtss_cell_3 = row_qtss.createCell(3);
		
		
		row_qtss_cell_2.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_qtss_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		//设置单元格内容
		row_qtss_cell_2.setCellValue("其他诉讼");
		if(jihuashu!=null && jihuashu.getHas_other_litigation()!=null){
			row_qtss_cell_3.setCellValue(Integer.parseInt(jihuashu.getHas_other_litigation())==1?"有":"无");
		}else{
			row_qtss_cell_3.setCellValue("无");
		}
		//跨行数
		sheet4.addMergedRegion(new CellRangeAddress(qtssLocRow,qtssLocRow,3,5));
		
		//其他诉讼--诉讼内容、诉讼原因-标题
		int qtssnryyLocRow = qtssLocRow+1;//应该所在的行
		HSSFRow row_qtssnryy = (HSSFRow) sheet4.createRow(qtssnryyLocRow);
		HSSFCell row_qtssnryy_cell_3 = row_qtssnryy.createCell(3);
		HSSFCell row_qtssnryy_cell_4 = row_qtssnryy.createCell(4);
		
		row_qtssnryy_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_qtssnryy_cell_4.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		
		//设置单元格内容
		row_qtssnryy_cell_3.setCellValue("诉讼内容");
		row_qtssnryy_cell_4.setCellValue("诉讼原因");
		//跨行数
		sheet4.addMergedRegion(new CellRangeAddress(qtssnryyLocRow,qtssnryyLocRow,4,5));
		
		//循环
		int qtssSize = 0;//其他诉讼集合大小
		if(jihuashu!=null && jihuashu.getHas_other_litigation()!=null){
			if(Integer.parseInt(jihuashu.getHas_other_litigation())==1){
				if(jihuashu.getOther_litigation_content().length()>0){
					qtssSize=jihuashu.getOther_litigation_content().split(",").length;//其他诉讼集合大小
					for (int i = 1; i <= qtssSize; i++) {
						//在sheet里创建第n开始到（n+i）行和单元格
						HSSFRow row_i = (HSSFRow) sheet4.createRow(qtssnryyLocRow+i);
						HSSFCell row_i_cell_3 = row_i.createCell(3);
						HSSFCell row_i_cell_4 = row_i.createCell(4);
						
						row_i_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
						row_i_cell_4.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
						//设置单元格内容
						row_i_cell_3.setCellValue(jihuashu.getOther_litigation_content().split(",")[i-1]);
						row_i_cell_4.setCellValue(jihuashu.getOther_litigation_reason().split(",")[i-1]);
						sheet4.addMergedRegion(new CellRangeAddress(qtssnryyLocRow+i,qtssnryyLocRow+i,4,5));
					}
				}
			}
		}
		int qtssMaxRow = qtssnryyLocRow+qtssSize;//其他诉讼循环完到达的最大行数
		sheet4.addMergedRegion(new CellRangeAddress(qtssLocRow,qtssMaxRow,2,2));
		//法律风险跨行跨列数
		sheet4.addMergedRegion(new CellRangeAddress(jyfxLocRow,qtssMaxRow,1,1));
		
		//经营风险与对策说明
		int jyfxshuomingLocRow = qtssMaxRow+1;//应该所在的行
		HSSFRow row_jyfxshuoming = (HSSFRow) sheet4.createRow(jyfxshuomingLocRow);
		HSSFCell row_jyfxshuoming_cell_1 = row_jyfxshuoming.createCell(1);
		row_jyfxshuoming_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		
		
		//设置单元格内容
		row_jyfxshuoming_cell_1.setCellValue("（包括：政策风险、技术开发风险、经营管理风险、市场开拓风险、生产风险、财务风险、汇率风险、对公司关键人员依赖的风险等，提出有效的风险控制和防范手段）");
		//跨行跨列数
		sheet4.addMergedRegion(new CellRangeAddress(jyfxshuomingLocRow,jyfxshuomingLocRow,1,5));
		
		//经营风险与对策跨行跨列数
		int jyfxMaxRow = jyfxshuomingLocRow;
		sheet4.addMergedRegion(new CellRangeAddress(jyfxLocRow,jyfxMaxRow,0,0));
		
		
		//企业管理模式模块
		//企业管理模式
		int qyglmsLocRow = jyfxMaxRow+1;
		HSSFRow row_qyglms = (HSSFRow) sheet4.createRow(qyglmsLocRow);
		HSSFCell row_qyglms_cell_0 = row_qyglms.createCell(0);
		HSSFCell row_qyglms_cell_1 = row_qyglms.createCell(1);
		HSSFCell row_qyglms_cell_5 = row_qyglms.createCell(5);
		
		row_qyglms_cell_0.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_qyglms_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_qyglms_cell_5.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		
		//设置单元格内容
		row_qyglms_cell_0.setCellValue("*企业管理模式");
		row_qyglms_cell_1.setCellValue("公司对管理层及关键人员是否将采取激励机制？");
		if(jihuashu!=null && jihuashu.getIs_excitation_mechanism()!=null){
			row_qyglms_cell_5.setCellValue(Integer.parseInt(jihuashu.getIs_excitation_mechanism())==1?"是":"否");
		}else{
			row_qyglms_cell_5.setCellValue("否");
		}
		//跨行跨列数
		sheet4.addMergedRegion(new CellRangeAddress(qyglmsLocRow,qyglmsLocRow,1,4));
		//持股问题
		int qyglmsLocRow_2 = qyglmsLocRow+1;
		HSSFRow row_qyglms_2 = (HSSFRow) sheet4.createRow(qyglmsLocRow_2);
		HSSFCell row_qyglms_2_cell_1 = row_qyglms_2.createCell(1);
		HSSFCell row_qyglms_2_cell_5 = row_qyglms_2.createCell(5);
		
		
		row_qyglms_2_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_qyglms_2_cell_5.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		//设置单元格内容
		row_qyglms_2_cell_1.setCellValue("公司是否考虑员工持股问题？");
		if(jihuashu!=null && jihuashu.getIs_esop()!=null){
			row_qyglms_2_cell_5.setCellValue(Integer.parseInt(jihuashu.getIs_esop())==1?"是":"否");
		}else{
			row_qyglms_2_cell_5.setCellValue("否");
		}
		//跨行跨列数
		sheet4.addMergedRegion(new CellRangeAddress(qyglmsLocRow_2,qyglmsLocRow_2,1,4));
		//企业管理模式说明
		int qyglmsLocRow_3 = qyglmsLocRow_2+1;
		HSSFRow row_qyglms_3 = (HSSFRow) sheet4.createRow(qyglmsLocRow_3);
		HSSFCell row_qyglms_3_cell_1 = row_qyglms_3.createCell(1);

		row_qyglms_3_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		//设置单元格内容
		row_qyglms_3_cell_1.setCellValue("（机构设置，员工持股，劳动合同，知识产权管理，规章制度等）");
		//跨行跨列数
		sheet4.addMergedRegion(new CellRangeAddress(qyglmsLocRow_3,qyglmsLocRow_3,1,5));
		
		//企业管理模式跨行跨列数
		int qyglmsMaxRow = qyglmsLocRow_3;
		sheet4.addMergedRegion(new CellRangeAddress(qyglmsLocRow,qyglmsMaxRow,0,0));
		
		
		//其他技术、产品及服务模块
		//其他技术、产品及服务
		int qtjscpfwLocRow = qyglmsMaxRow+1;
		HSSFRow row_qtjscpfw = (HSSFRow) sheet4.createRow(qtjscpfwLocRow);
		HSSFCell row_qtjscpfw_cell_0 = row_qtjscpfw.createCell(0);
		HSSFCell row_qtjscpfw_cell_1 = row_qtjscpfw.createCell(1);
		
		row_qtjscpfw_cell_0.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_qtjscpfw_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		//设置单元格内容
		row_qtjscpfw_cell_0.setCellValue("*其他技术、产品及服务");
		if(jihuashu!=null && jihuashu.getOther_tec_product_service()!=null){
			row_qtjscpfw_cell_1.setCellValue(jihuashu.getOther_tec_product_service());
		}else{
			row_qtjscpfw_cell_1.setCellValue("无");
		}
		//跨行跨列数
		sheet4.addMergedRegion(new CellRangeAddress(qtjscpfwLocRow,qtjscpfwLocRow,1,5));
		
		
		//参赛项目若非主营业务请填写主营业务模块
		//参赛项目若非主营业务请填写主营业务
		int zyywLocRow = qtjscpfwLocRow+1;
		HSSFRow row_zyyw = (HSSFRow) sheet4.createRow(zyywLocRow);
		HSSFCell row_zyyw_cell_0 = row_zyyw.createCell(0);
		HSSFCell row_zyyw_cell_1 = row_zyyw.createCell(1);
		
		row_zyyw_cell_0.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_zyyw_cell_1.setCellStyle(excelstylehight.getCellStyleheader());// 应用到单元格
		
		//设置单元格内容
		row_zyyw_cell_0.setCellValue("*参赛项目若非主营业务请填写主营业务");
		if(jihuashu!=null && jihuashu.getMain_business()!=null){
			row_zyyw_cell_1.setCellValue(jihuashu.getMain_business());
		}else{
			row_zyyw_cell_1.setCellValue("无");
		}
		//跨行跨列数
		sheet4.addMergedRegion(new CellRangeAddress(zyywLocRow,zyywLocRow,1,5));
		
		
		//历史财务数据模块
		//历史财务数据
		int lscwsjLocRow = zyywLocRow+1;
		HSSFRow row_lscwsj = (HSSFRow) sheet4.createRow(lscwsjLocRow);
		HSSFCell row_lscwsj_cell_0 = row_lscwsj.createCell(0);
		HSSFCell row_lscwsj_cell_1 = row_lscwsj.createCell(1);
		
		row_lscwsj_cell_0.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_lscwsj_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		
		//设置单元格内容
		row_lscwsj_cell_0.setCellValue("*历史财务数据");
		row_lscwsj_cell_1.setCellValue("注意：以下的财务数据是企业整体财务数据            单位：万元人民币，小数点后保留六位");
		//跨行跨列数
		sheet4.addMergedRegion(new CellRangeAddress(lscwsjLocRow,lscwsjLocRow,1,5));
		
		//科目生成的行
		List<HSSFRow> kemuRowList = new ArrayList<HSSFRow>();
		//科目项
		String subjectList[] = new String[]{"科目","营业收入","营业成本","营业税金及附加","营业费用","管理费用","财务费用","投入研发费用",
				"营业利润","营业利润率","营业外收支","利润总额","净利润","货币资金","应收项目","存货","固定资产净值","无形资产",
				"资产总计","应付项目","短期借款","长期借款","负债总计","净资产（所有者权益）"};
		int shuzuSize = subjectList.length;//科目数组大小
		for (int i = 1; i <= shuzuSize; i++) {
			HSSFRow row_i = (HSSFRow) sheet4.createRow(lscwsjLocRow+i);
			kemuRowList.add(row_i);
			HSSFCell row_i_cell_1 = row_i.createCell(1);
			row_i_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
			//设置单元格内容
			row_i_cell_1.setCellValue(subjectList[i-1].toString());
		}
		
		//设置历史财务数据
		Cshistoricalfinancialdata caiwubaobiao = lishicaiwu;
		if(caiwubaobiao!=null && caiwubaobiao.getIncome()!=null && caiwubaobiao.getIncome().split(",").length>0){
			//设置财务数据
			for (int i = 1; i <= shuzuSize; i++) {
				HSSFRow row_i = kemuRowList.get(i-1);
				HSSFCell row_i_cell_2 = row_i.createCell(2);
				HSSFCell row_i_cell_3 = row_i.createCell(3);
				HSSFCell row_i_cell_4 = row_i.createCell(4);
				
				row_i_cell_2.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
				row_i_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
				row_i_cell_4.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
				
				if(caiwubaobiao.getIncome().split(",").length==1){
					//设置单元格内容
					switch (i) {
						case 1:
							row_i_cell_2.setCellValue("2016年");
							row_i_cell_3.setCellValue("");
							row_i_cell_4.setCellValue("");
						    break;
						case 2:
							row_i_cell_2.setCellValue(caiwubaobiao.getIncome());
						    break;
						case 3:
							row_i_cell_2.setCellValue(caiwubaobiao.getCost());
						    break;
						case 4:
							row_i_cell_2.setCellValue(caiwubaobiao.getTax_and_additional());
						    break;
						case 5:
							row_i_cell_2.setCellValue(caiwubaobiao.getBusiness_expenses());
						    break;
						case 6:
							row_i_cell_2.setCellValue(caiwubaobiao.getManagement_expenses());
						    break;
						case 7:
							row_i_cell_2.setCellValue(caiwubaobiao.getFinancial_expenses());
						    break;
						case 8:
							row_i_cell_2.setCellValue(caiwubaobiao.getResearch_expenses());
						    break;
						case 9:
							row_i_cell_2.setCellValue(caiwubaobiao.getProfit());
						    break;
						case 10:
							row_i_cell_2.setCellValue(caiwubaobiao.getProfit_rate());
						    break;
						case 11:
							row_i_cell_2.setCellValue(caiwubaobiao.getNonoperating_revenues_and_expenses());
						    break;
						case 12:
							row_i_cell_2.setCellValue(caiwubaobiao.getTotal_profit());
						    break;
						case 13:
							row_i_cell_2.setCellValue(caiwubaobiao.getNet_profit());
						    break;
						case 14:
							row_i_cell_2.setCellValue(caiwubaobiao.getMonetary_fund());
						    break;
						case 15:
							row_i_cell_2.setCellValue(caiwubaobiao.getReceivable());
						    break;
						case 16:
							row_i_cell_2.setCellValue(caiwubaobiao.getInventory());
						    break;
						case 17:
							row_i_cell_2.setCellValue(caiwubaobiao.getNet_fixed_assets());
						    break;
						case 18:
							row_i_cell_2.setCellValue(caiwubaobiao.getIntangible_assets());
						    break;
						case 19:
							row_i_cell_2.setCellValue(caiwubaobiao.getTotal_assets());
						    break;
						case 20:
							row_i_cell_2.setCellValue(caiwubaobiao.getPayables());
						    break;
						case 21:
							row_i_cell_2.setCellValue(caiwubaobiao.getShort_term_loan());
						    break;
						case 22:
							row_i_cell_2.setCellValue(caiwubaobiao.getLong_term_loan());
						    break;
						case 23:
							row_i_cell_2.setCellValue(caiwubaobiao.getTotal_loan());
						    break;
						case 24:
							row_i_cell_2.setCellValue(caiwubaobiao.getNet_assets());
						    break;
					};
				}else if(caiwubaobiao.getIncome().split(",").length==3){
					//设置单元格内容
					switch (i) {
						case 1:
							row_i_cell_2.setCellValue("2014年");
							row_i_cell_3.setCellValue("2015年");
							row_i_cell_4.setCellValue("2016年");
						    break;
						case 2:
							if(caiwubaobiao.getIncome().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getIncome().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getIncome().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getIncome().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getIncome().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getIncome().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
						    break;
						case 3:
							if(caiwubaobiao.getCost().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getCost().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getCost().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getCost().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getCost().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getCost().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
						    break;
						case 4:
							if(caiwubaobiao.getTax_and_additional().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getTax_and_additional().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getTax_and_additional().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getTax_and_additional().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getTax_and_additional().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getTax_and_additional().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
						case 5:
							if(caiwubaobiao.getBusiness_expenses().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getBusiness_expenses().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getBusiness_expenses().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getBusiness_expenses().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getBusiness_expenses().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getBusiness_expenses().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
						case 6:
							if(caiwubaobiao.getManagement_expenses().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getManagement_expenses().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getManagement_expenses().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getManagement_expenses().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getManagement_expenses().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getManagement_expenses().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
						case 7:
							if(caiwubaobiao.getFinancial_expenses().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getFinancial_expenses().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getFinancial_expenses().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getFinancial_expenses().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getFinancial_expenses().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getFinancial_expenses().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
						case 8:
							if(caiwubaobiao.getResearch_expenses().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getResearch_expenses().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getResearch_expenses().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getResearch_expenses().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getResearch_expenses().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getResearch_expenses().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
						case 9:
							if(caiwubaobiao.getProfit().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getProfit().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getProfit().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getProfit().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getProfit().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getProfit().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
						case 10:
							if(caiwubaobiao.getProfit_rate().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getProfit_rate().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getProfit_rate().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getProfit_rate().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getProfit_rate().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getProfit_rate().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
						case 11:
							if(caiwubaobiao.getNonoperating_revenues_and_expenses().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getNonoperating_revenues_and_expenses().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getNonoperating_revenues_and_expenses().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getNonoperating_revenues_and_expenses().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getNonoperating_revenues_and_expenses().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getNonoperating_revenues_and_expenses().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
						case 12:
							if(caiwubaobiao.getTotal_profit().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getTotal_profit().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getTotal_profit().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getTotal_profit().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getTotal_profit().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getTotal_profit().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
						case 13:
							if(caiwubaobiao.getNet_profit().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getNet_profit().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getNet_profit().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getNet_profit().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getNet_profit().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getNet_profit().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
						case 14:
							if(caiwubaobiao.getMonetary_fund().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getMonetary_fund().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getMonetary_fund().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getMonetary_fund().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getMonetary_fund().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getMonetary_fund().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
						case 15:
							if(caiwubaobiao.getReceivable().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getReceivable().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getReceivable().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getReceivable().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getReceivable().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getReceivable().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
						case 16:
							if(caiwubaobiao.getInventory().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getInventory().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getInventory().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getInventory().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getInventory().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getInventory().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
						case 17:
							if(caiwubaobiao.getNet_fixed_assets().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getNet_fixed_assets().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getNet_fixed_assets().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getNet_fixed_assets().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getNet_fixed_assets().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getNet_fixed_assets().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
						case 18:
							if(caiwubaobiao.getIntangible_assets().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getIntangible_assets().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getIntangible_assets().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getIntangible_assets().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getIntangible_assets().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getIntangible_assets().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
						case 19:
							if(caiwubaobiao.getTotal_assets().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getTotal_assets().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getTotal_assets().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getTotal_assets().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getTotal_assets().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getTotal_assets().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
						case 20:
							if(caiwubaobiao.getPayables().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getPayables().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getPayables().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getPayables().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getPayables().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getPayables().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
						case 21:
							if(caiwubaobiao.getShort_term_loan().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getShort_term_loan().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getShort_term_loan().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getShort_term_loan().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getShort_term_loan().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getShort_term_loan().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
						case 22:
							if(caiwubaobiao.getLong_term_loan().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getLong_term_loan().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getLong_term_loan().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getLong_term_loan().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getLong_term_loan().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getLong_term_loan().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
						case 23:
							if(caiwubaobiao.getTotal_loan().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getTotal_loan().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getTotal_loan().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getTotal_loan().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getTotal_loan().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getTotal_loan().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
						case 24:
							if(caiwubaobiao.getNet_assets().split(",").length>=1){
								row_i_cell_2.setCellValue(caiwubaobiao.getNet_assets().split(",")[0].toString());
							}else{
								row_i_cell_2.setCellValue("无");
							}
							if(caiwubaobiao.getNet_assets().split(",").length>=2){
								row_i_cell_3.setCellValue(caiwubaobiao.getNet_assets().split(",")[1].toString());
							}else{
								row_i_cell_3.setCellValue("无");
							}
							if(caiwubaobiao.getNet_assets().split(",").length>=3){
								row_i_cell_4.setCellValue(caiwubaobiao.getNet_assets().split(",")[2].toString());
							}else{
								row_i_cell_4.setCellValue("无");
							}
							break;
					};
				}
			}
		}else{
			for (int i = 1; i <= shuzuSize; i++) {
				HSSFRow row_i = kemuRowList.get(i-1);
				HSSFCell row_i_cell_2 = row_i.createCell(2);
				HSSFCell row_i_cell_3 = row_i.createCell(3);
				HSSFCell row_i_cell_4 = row_i.createCell(4);
				row_i_cell_2.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
				row_i_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
				row_i_cell_4.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
				if(i==1){
					row_i_cell_2.setCellValue("2014年");
					row_i_cell_3.setCellValue("2015年");
					row_i_cell_4.setCellValue("2016年");
				}else{
					row_i_cell_2.setCellValue("无");
					row_i_cell_3.setCellValue("无");
					row_i_cell_4.setCellValue("无");
				}
				
			}
		}
		
		int lscwsjMaxRow = lscwsjLocRow+shuzuSize;
		//历史财务数据跨行跨列数
		sheet4.addMergedRegion(new CellRangeAddress(lscwsjLocRow,lscwsjMaxRow,0,0));
		
		
		//财务预测模块
		//财务预测
		int cwycLocRow = lscwsjMaxRow+1;//所在行
		HSSFRow row_cwyc = (HSSFRow) sheet4.createRow(cwycLocRow);
		HSSFCell row_cwyc_cell_0 = row_cwyc.createCell(0);
		HSSFCell row_cwyc_cell_1 = row_cwyc.createCell(1);
		HSSFCell row_cwyc_cell_2 = row_cwyc.createCell(2);
		HSSFCell row_cwyc_cell_3 = row_cwyc.createCell(3);
		HSSFCell row_cwyc_cell_4 = row_cwyc.createCell(4);
		
		
		row_cwyc_cell_0.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_cwyc_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_cwyc_cell_2.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_cwyc_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		row_cwyc_cell_4.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		
		//设置单元格内容
		row_cwyc_cell_0.setCellValue("*财务预测");
		row_cwyc_cell_1.setCellValue("科目");
		row_cwyc_cell_2.setCellValue("2017年");
		row_cwyc_cell_3.setCellValue("2018年");
		row_cwyc_cell_4.setCellValue("2019年");
		
		//财务预测集合行
		List<HSSFRow> yuceRowList = new ArrayList<HSSFRow>();
		int cwycLocRow_2 = cwycLocRow+1;//所在行
		HSSFRow row_cwycLocRow_2 = (HSSFRow) sheet4.createRow(cwycLocRow_2);
		HSSFCell row_cwycLocRow_2_cell_1 = row_cwycLocRow_2.createCell(1);
		row_cwycLocRow_2_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		//设置单元格内容
		row_cwycLocRow_2_cell_1.setCellValue("营业收入");
		yuceRowList.add(row_cwycLocRow_2);//添加到集合中
		
		int cwycLocRow_3 = cwycLocRow_2+1;//所在行
		HSSFRow row_cwycLocRow_3 = (HSSFRow) sheet4.createRow(cwycLocRow_3);
		HSSFCell row_cwycLocRow_3_cell_1 = row_cwycLocRow_3.createCell(1);
		row_cwycLocRow_3_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		//设置单元格内容
		row_cwycLocRow_3_cell_1.setCellValue("营业成本");
		yuceRowList.add(row_cwycLocRow_3);//添加到集合中
		
		int cwycLocRow_4 = cwycLocRow_3+1;//所在行
		HSSFRow row_cwycLocRow_4 = (HSSFRow) sheet4.createRow(cwycLocRow_4);
		HSSFCell row_cwycLocRow_4_cell_1 = row_cwycLocRow_4.createCell(1);
		row_cwycLocRow_4_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		//设置单元格内容
		row_cwycLocRow_4_cell_1.setCellValue("营业税金及附加");
		yuceRowList.add(row_cwycLocRow_4);//添加到集合中
		
		int cwycLocRow_5 = cwycLocRow_4+1;//所在行
		HSSFRow row_cwycLocRow_5 = (HSSFRow) sheet4.createRow(cwycLocRow_5);
		HSSFCell row_cwycLocRow_5_cell_1 = row_cwycLocRow_5.createCell(1);
		row_cwycLocRow_5_cell_1.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
		//设置单元格内容
		row_cwycLocRow_5_cell_1.setCellValue("净利润");
		yuceRowList.add(row_cwycLocRow_5);//添加到集合中
		
		//财务预测跨行跨列数
		sheet4.addMergedRegion(new CellRangeAddress(cwycLocRow,cwycLocRow+4,0,0));
		
		
		if(caiwuyuce!=null && caiwuyuce.getIncome()!=null){
			//设置预测数据
			for (int i = 1; i <= 4; i++) {
				HSSFRow row_i = yuceRowList.get(i-1);
				HSSFCell row_i_cell_2 = row_i.createCell(2);
				HSSFCell row_i_cell_3 = row_i.createCell(3);
				HSSFCell row_i_cell_4 = row_i.createCell(4);
				
				row_i_cell_2.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
				row_i_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
				row_i_cell_4.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
				
				//设置数据
				switch (i) {
					case 1:
						if(caiwuyuce.getIncome().split(",").length>=1){
							row_i_cell_2.setCellValue(caiwuyuce.getIncome().split(",")[0].toString());
						}else{
							row_i_cell_2.setCellValue("无");
						}
						if(caiwuyuce.getIncome().split(",").length>=2){
							row_i_cell_3.setCellValue(caiwuyuce.getIncome().split(",")[1].toString());
						}else{
							row_i_cell_3.setCellValue("无");
						}
						if(caiwuyuce.getIncome().split(",").length>=3){
							row_i_cell_4.setCellValue(caiwuyuce.getIncome().split(",")[2].toString());
						}else{
							row_i_cell_4.setCellValue("无");
						}
					    break;
					case 2:
						if(caiwuyuce.getCost().split(",").length>=1){
							row_i_cell_2.setCellValue(caiwuyuce.getCost().split(",")[0].toString());
						}else{
							row_i_cell_2.setCellValue("无");
						}
						if(caiwuyuce.getCost().split(",").length>=2){
							row_i_cell_3.setCellValue(caiwuyuce.getCost().split(",")[1].toString());
						}else{
							row_i_cell_3.setCellValue("无");
						}
						if(caiwuyuce.getCost().split(",").length>=3){
							row_i_cell_4.setCellValue(caiwuyuce.getCost().split(",")[2].toString());
						}else{
							row_i_cell_4.setCellValue("无");
						}
					    break;
					case 3:
						if(caiwuyuce.getTax_and_additional().split(",").length>=1){
							row_i_cell_2.setCellValue(caiwuyuce.getTax_and_additional().split(",")[0].toString());
						}else{
							row_i_cell_2.setCellValue("无");
						}
						if(caiwuyuce.getTax_and_additional().split(",").length>=2){
							row_i_cell_3.setCellValue(caiwuyuce.getTax_and_additional().split(",")[1].toString());
						}else{
							row_i_cell_3.setCellValue("无");
						}
						if(caiwuyuce.getTax_and_additional().split(",").length>=3){
							row_i_cell_4.setCellValue(caiwuyuce.getTax_and_additional().split(",")[2].toString());
						}else{
							row_i_cell_4.setCellValue("无");
						}
					    break;
					case 4:
						if(caiwuyuce.getNet_profit().split(",").length>=1){
							row_i_cell_2.setCellValue(caiwuyuce.getNet_profit().split(",")[0].toString());
						}else{
							row_i_cell_2.setCellValue("无");
						}
						if(caiwuyuce.getNet_profit().split(",").length>=2){
							row_i_cell_3.setCellValue(caiwuyuce.getNet_profit().split(",")[1].toString());
						}else{
							row_i_cell_3.setCellValue("无");
						}
						if(caiwuyuce.getNet_profit().split(",").length>=3){
							row_i_cell_4.setCellValue(caiwuyuce.getNet_profit().split(",")[2].toString());
						}else{
							row_i_cell_4.setCellValue("无");
						}
					    break;
				};
			}
		}else{
			for (int i = 1; i <= 4; i++) {
				HSSFRow row_i = yuceRowList.get(i-1);
				HSSFCell row_i_cell_2 = row_i.createCell(2);
				HSSFCell row_i_cell_3 = row_i.createCell(3);
				HSSFCell row_i_cell_4 = row_i.createCell(4);
				row_i_cell_2.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
				row_i_cell_3.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
				row_i_cell_4.setCellStyle(excelstyle.getCellStyleheader());// 应用到单元格
				row_i_cell_2.setCellValue("无");
				row_i_cell_3.setCellValue("无");
				row_i_cell_4.setCellValue("无");
			}
		}
		
		
		
		//循环获取每行每个单元格进行设置字体
		for (int i = 1; i < sheet4.getPhysicalNumberOfRows(); i++) {
			HSSFRow row_i = (HSSFRow) sheet4.getRow(i);
			if(row_i!=null){
				row_i.setHeight((short) 800);//参数500约等于0.9cm,34px
			}
		}
				row6.setHeight((short) 7500);//参数500约等于0.9cm,34px
				row_shuoming.setHeight((short) 5000);//参数500约等于0.9cm,34px
				row_zyyw.setHeight((short) 7500);//参数500约等于0.9cm,34px
				
				row_syms.setHeight((short) 5000);//参数500约等于0.9cm,34px
				row_ywtzjh.setHeight((short) 5000);//参数500约等于0.9cm,34px
				row_jzys.setHeight((short) 5000);//参数500约等于0.9cm,34px
				row5.setHeight((short) 2000);//参数500约等于0.9cm,34px
	}

	
}
